import Vue from 'vue'
import Vuex from 'vuex'
/*
仓库内容
*/
Vue.use(Vuex)

//创建仓库
let cangku = new Vuex.Store({
  state: {
	  //专门用来放数据的
	  isCollapse:false,
	  wid:true,
	  wid2:false
  },
  mutations: {
	  changeIsCollapse(state){
	  		  state.isCollapse = ! state.isCollapse;
			  if(state.isCollapse){
				  state.wid = false;
				  state.wid2 = true;
			  }else{
				  state.wid = true;
				  state.wid2 = false;
			  }
	  }
  },
  actions: {
	  changeIsCollapse(store){
		  store.commit("changeIsCollapse");
	  }
  },
  modules: {
  }
})

export default cangku;
